﻿@*
    表单内容
*@

@using NewLife;
@using XCode;
@using XCode.Configuration;
@{
    var entity = Model as IEntity;
    var fields = ViewBag.Fields as FieldCollection;
}



<div class="card-body m-1 border-top border-bottom pb-10">

    @await Html.PartialAsync("_Form_Body_Message")

    <div class="tab-pane fade show active mt-8">
        <div class="row m-0">
            @foreach (var item in fields)
            {
                <div class="col-xl-6 mt-0">
                    <div class="kt-portlet shadow-none">
                        <div class="kt-form kt-form--label-right">
                            <div class="row">

                                <label class="col-3 col-form-label d-flex justify-content-end">
                                    @item.DisplayName
                                </label>
                                <div class="col-6">
                                    @await Html.PartialAsync("_Form_Editor", new ValueTuple<IEntity, DataField>(entity, item))
                                </div>
                                <label class="col-3 col-form-label d-flex justify-content-start text-gray-500 fs-8">
                                    @item.Description.TrimStart(item.DisplayName).TrimStart(",", ".", "，", "。")
                                </label>

                            </div>
                        </div>
                    </div>
                </div>
            }

        </div>
    </div>

</div>




